package shejimoshi.jieshiqimoshi;

public class client {
    public static void main(String[] args) {
        Expression expr1 = new TerminalExpression("terminal");
        Expression expr2 = new TerminalExpression("something else");
        Expression or = new OrExpression(expr1, expr2); // 使用不同的表达式

        System.out.println(or.interpret("terminal")); // true
        System.out.println(or.interpret("something else")); // true
        System.out.println(or.interpret("or")); // false
    }
}
